<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            margin: 10px;
            float: left;
        }

        .one {
            background-color: red;
        }

        .two {
            background-color: gray;

            position: absolute;
            /* position: relative; */
            top: 70px;
            left: 170px;
        }

        .three {
            background-color: green;
        }

        .exp {
            clear: both;
            margin-top: 100px;
        }

        img {
            width: 500px;
            height: 400px;
        }
    </style>
</head>

<body>
    <div class="one">1</div>
    <div class="two">2</div>
    <div class="three">3</div>

    <div class="exp">
        <table>
            <tr>
                <td>
                    <h2>绝对定位</h2>
                    <img src="../../images/absolute.png" />
                </td>
                <td>
                    <h2>相对定位</h2>
                    <img src="../../images/relative.png" />
                </td>
            </tr>
        </table>


    </div>
</body>

</html>